/**
 * File: 
 * Proj/Lab:
 * Author:
 * Date:
 * Section:
 * Email:
 */
package proj;

import java.util.ArrayList;

/**
 * @author Ben
 *
 */
public class Catalog 
{
	private ArrayList<Course> courses = new ArrayList<Course>();
	
	public Catalog()
	{
		//init without loading
	}
	
	public Catalog(ArrayList<Course> myCourses)
	{
		courses = myCourses;
	}
	
	public ArrayList<Course> getCourses() 
	{
		return courses;
	}

	public void setCourses(ArrayList<Course> courses) 
	{
		this.courses = courses;
	}
	
	public Course getCourse(String courseID)
	{
		for(int i = 0; i != courses.size(); i++)
		{
			Course tempCourse = courses.get(i);
			if(tempCourse.getCourseCode() == courseID)
			{
				return tempCourse;
			}
		}
		return null;
	}
	
	public void addCourse(Course newCourse)
	{
		courses.add(newCourse);
	}
}
